{% ifnotequal paginator.num_pages 1 %}
<div class="paginator {{ token }}">
  <div class="links">
    {% if page_obj.has_previous %}
    <a href="?{{ query_string }}{{ page_name }}={{ page_obj.previous_page_number }}" class="previous">←</a>
    {% else %}
    <span class="previous">←</span>
    {% endif %}
    
      <form action="./" method="get">
    {{ form_input_string }}
    <label for="paginator_page_input">страница</label> <input type="text" name="page" value="{{ page_obj.number }}" id="paginator_page_input"> 
    из {% if show_last_link %}<a href="?{{ query_string }}page=last">{{ paginator.num_pages }}</a>{% else %}{{ paginator.num_pages }}{% endif %}
  </form>
    
    {% if page_obj.has_next %}
    <a href="?{{ query_string }}{{ page_name }}={{ page_obj.next_page_number }}" class="next">→</a>
    {% else %}
    <span class="next">→</span>
    {% endif %}
  </div>
</div>
{% endifnotequal %}